<template>
  <div v-html="showResult" width=400 heigth=300 style="color:#00F;text-align:center">{{showResult}}</div>
</template>
<script>
import { vueResource } from "vue-resource";
import htmlStatement from "./services/statement.js"
export default {
  name: "HelloWorld",
  data() {
    return {
      plays: null,
      invoices: null,
      showResult: null
    };
  },
  created() {
    this.test();
  },
  methods: {
    async test() {
      await this.$http.get("/static/plays.json").then(res => {
        this.plays = res.body;
      });
      await this.$http.get("/static/invoices.json").then(res => {
        this.invoices = res.body;
      });
      this.showResult = htmlStatement(this.invoices[0], this.plays);
    },
   
   
  
  }
};
</script>